﻿using DA;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BL
{
    public class SanPhamBL
    {
        SanPhamDA sanPhamDA;

        public SanPhamBL()
        {
            sanPhamDA = new SanPhamDA();
        }

        public DataSet layDanhSachSanPham()
        {
            return sanPhamDA.layDanhSachSanPham();
        }

        public DataSet timKiemSanPham(string maSanPham)
        {
            return sanPhamDA.timKiemSanPham(maSanPham);
        }

        public void updateSanPham(DataTable dt)
        {
            sanPhamDA.danhSachSanPhamAdapter.Update(dt);
        }

        public DataSet thongTinSanPham(string maSanPham)
        {
            return sanPhamDA.thongTinSanPham(maSanPham);
        }

        public int taoSanPhamMoi(string maSanPham, string tenSanPham, string soMau, string kichThuoc, string doKho, string maRap, string maKhuon, string maNapChup, string hinhVe)
        {
            return sanPhamDA.taoSanPhamMoi(maSanPham, tenSanPham, soMau, kichThuoc, doKho, maRap, maKhuon, maNapChup, hinhVe);
        }

        public void updateTimKiemSanPham(DataTable dt)
        {
            sanPhamDA.timKiemSanPhamAdapter.Update(dt);
        }


    }
}
